package de.tudresden.inf.ggp.basicplayer;

import org.eclipse.palamedes.gdl.core.model.*;

public class CAction {

	private IMove ActionID;
	private int NVisit;
	private int TotalValue;
	
	public CAction(IMove ID){
		this.ActionID=ID;
		this.NVisit=0;
		this.TotalValue=0;
	}

	public int getAvgValue(){
		return this.TotalValue/this.NVisit;
	}
	
	public IMove getActionID() {
		return ActionID;
	}

	public void setActionID(IMove actionID) {
		ActionID = actionID;
	}

	public int getNVisit() {
		return NVisit;
	}

	public void setNVisit(int visit) {
		NVisit = visit;
	}

	public int getTotalValue() {
		return TotalValue;
	}

	public void setTotalValue(int totalValue) {
		TotalValue = totalValue;
	}
	
	public void addVisit(int N){
		this.NVisit+=N;
	}
	
	public void addValue(int Value){
		this.TotalValue+=Value;
	}
}

	/*o  ActionID: IMove; 
	o  NVisit: integer; 
	o  TotalValue: integer; 
	Constructor 
	o  Public CAction(ID: IMove) create an action with ActionID=ID, NVisit=0, TotalValue=0. 
	Method 
	o  Public integer getNVisit: return NVisit 
	o  Public integer getTotalValue: return TotalValue 
	o  Public integer getAvgValue: return TotalValue/NVisit 
	o  Public void addVisit(N: integer): add N to NVisit 
	o  Public void addValue(Value: integer): add Value to TotalValue */